home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1999 April / Cd Pc Users extra 19 abril 1999.iso / Prog / Inst / Js02 / js02.exe / jscripts / mvtickrightl2v02.js < prev    next >
Encoding:
JavaScript  |  1999-02-07  |  2.6 KB  |  65 lines

  1. //---------------------------------------------------------
  2. //JavaScript Code For Navigator 4+ and Internet Explorer 4+
  3. //
  4. //---------------------------------------------------------
  5. // Moving Ticker Object Right
  6. //
  7. // signe_browser=0:     Navigator 4
  8. // signe-browser=1:     Internet Explorer 4
  9. // ly:             Ticker Object
  10. // ntxtticker:         Number of Ticker or Object
  11. // contticker:         counter ticker countticker=1 initial value
  12. // tickerRight:         ticker position
  13. // tickerRight=0         initial value for Netscape
  14. // signe_up=0         Initialization
  15. // stepRight:         pixel size for each moving ticker
  16. // dis1:             limit position in left
  17. // dis2:             limit position in right 
  18. // timer:             timeout for moving ticker in millisesigne_move
  19. // ex: mvtickerRight(nbrowser,'copyright',3,1,0,0,5,-200,560,100);
  20. //----------------------------------------------------------
  21.  
  22.  
  23. var timeout_id_mvtickerRightL2=new initArray();
  24.  
  25. function mvtickerRightL2(signe_browser,nid,signe_move,ly1,ly2,ntxtticker,countticker,tickerRight,signe_up,stepRight,dis1,dis2,timer){
  26.  
  27.     if (signe_move=='true') {
  28.     if (signe_up==0) {        
  29.         signe_up=1;
  30.         var NameDIV=eval("'"+ly2+1+"'");
  31.         if (signe_browser==0) document[ly1].document[ly2].document[NameDIV].visibility="inherit";
  32.         if (signe_browser==1) document.all[ly1].document.all[ly2].document.all[NameDIV].style.visibility="inherit";
  33.     }
  34.     
  35.         if (tickerRight >= dis2 ) {
  36.         tickerRight= dis1;
  37.         if (ntxtticker > 1){
  38.             var NameDIV=eval("'"+ly2+countticker+"'");
  39.             if (signe_browser==0) document[ly1].document[ly2].document[NameDIV].visibility="hidden";
  40.             if (signe_browser==1) document.all[ly1].document.all[ly2].document.all[NameDIV].style.visibility="hidden";
  41.             countticker=countticker+1;
  42.             if (countticker==ntxtticker+1) countticker=1;
  43.             var NameDIV=eval("'"+ly2+countticker+"'");
  44.             if (signe_browser==0) document[ly1].document[ly2].document[NameDIV].visibility="inherit";
  45.             if (signe_browser==1) document.all[ly1].document.all[ly2].document.all[NameDIV].style.visibility="inherit";
  46.         }
  47.     }
  48.     
  49.         if (tickerRight < dis2 ) {
  50.               tickerRight=tickerRight+stepRight;
  51.         var NameDIV=eval("'"+ly2+countticker+"'");
  52.         if (signe_browser==0) document[ly1].document[ly2].document[NameDIV].left=tickerRight;
  53.         if (signe_browser==1) document.all[ly1].document.all[ly2].document.all[NameDIV].style.left=tickerRight;
  54.               timeout_id_mvtickerRightL2[nid]=setTimeout("mvtickerRightL2("+signe_browser+","+nid+",'"+signe_move+"','"+ly1+"','"+ly2+"',"+ntxtticker+","+countticker+","+tickerRight+","+signe_up+" ,"+stepRight+","+dis1+","+dis2+","+timer+")", timer);
  55.               return;
  56.     }
  57.     }else{
  58.         clearTimeout(timeout_id_mvtickerRightL2[nid]);
  59.         timeout_id_mvtickerRightL2[nid]=null;
  60.     }
  61.  
  62. }
  63.  
  64.  
  65.